using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace ERPBackend.Migrations
{
    /// <inheritdoc />
    public partial class ConfigurePurchaseStockInSupplierRelationship : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateIndex(
                name: "IX_purchase_stock_in_supplier_id",
                table: "purchase_stock_in",
                column: "supplier_id");

            migrationBuilder.AddForeignKey(
                name: "FK_purchase_stock_in_supplier_supplier_id",
                table: "purchase_stock_in",
                column: "supplier_id",
                principalTable: "supplier",
                principalColumn: "id",
                onDelete: ReferentialAction.NoAction);
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_purchase_stock_in_supplier_supplier_id",
                table: "purchase_stock_in");

            migrationBuilder.DropIndex(
                name: "IX_purchase_stock_in_supplier_id",
                table: "purchase_stock_in");
        }
    }
}
